from sqlalchemy import create_engine,Column,Integer,String
from sqlalchemy.orm import declarative_base

#数据库的变量
HOST = '127.0.0.1'
PORT = 3306
DATABASE = 'itbz'
USER = 'root'
PWD = 'root'
DB_URI = f'mysql+pymysql://{USER}:{PWD}@{HOST}:{PORT}/{DATABASE}'

engine = create_engine(DB_URI)
Base = declarative_base()
class User(Base):
    __tablename__ = 't_user'
    id = Column(Integer,primary_key=True,autoincrement=True)
    name = Column(String(32))
    age = Column(Integer)

